package com.voiceblog.logic;

import java.util.List;

import com.voiceblog.dao.BlogDAO;
import com.voiceblog.model.Blog;

public class VoiceBlogImpl implements VoiceBlogFacade {
	
	private BlogDAO  blogDAO;

	//-------------------------------------------------------------------------
	// Setter methods for dependency injection
	//-------------------------------------------------------------------------
	public void setBlogDAO(BlogDAO blogDAO) {
		this.blogDAO = blogDAO;
	}
	
	public List findAll() {
	    return this.blogDAO.findAll(); 
	}

	public Blog findById(int id) {
		
		return this.blogDAO.findById(id);
	}

	public void save(Blog transientInstance) {
		this.blogDAO.save(transientInstance);
		
	}
	

}
